package com.baizhi.genericity2;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * 足球彩票中奖号码生成
 */
public class FootBallNum implements GenNumUtil<Integer> {


    @Override
    public Integer genNum() {
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            Random ran = new Random();
            int num = ran.nextInt(10);
            list.add(num);
        }

        int code = list.get(0) * 10000
                + list.get(1) * 1000
                + list.get(2) * 100
                + list.get(3) * 10
                + list.get(4) * 1;

        return code;
    }
}


